package com.ja.openchat.adapters;

import android.widget.CheckBox;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.ja.openchat.R;
import com.ja.openchat.ui.found.WhoLookActivity;
import com.zy.openchat.core.model.circle.UserTags;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class UserTagGroupsAdapter extends BaseQuickAdapter<UserTags, BaseViewHolder> {

    public UserTagGroupsAdapter(@Nullable List<UserTags> data) {
        super(R.layout.item_user_tag_goup, data);
        addChildClickViewIds(R.id.iv_bar_setting);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, UserTags userTags) {
        CheckBox check_box = baseViewHolder.getView(R.id.check_box);
        check_box.setChecked(userTags.isChecked);
        baseViewHolder.setText(R.id.iv_title,userTags.name);
        TextView openchat_name_text = baseViewHolder.getView(R.id.openchat_name_text);
        WhoLookActivity.showTextByUserList(userTags.userInfoLis,userTags.users,openchat_name_text);
    }
}
